package com.chattingroom.mqcosumer.feign;

import com.chattingroom.mqcosumer.feign.interfaces.MyConsumerFeign;
import com.chattingroom.mqcosumer.util.SpringUtil;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CosumerFeignController implements MyConsumerFeign {


    @Override
    public String listener(String queueName) {
        SimpleMessageListenerContainer container = SpringUtil.getBean(SimpleMessageListenerContainer.class);
        container.addQueueNames(queueName);
        return "添加完成";
    }
}
